package com.sihan.framework.etm.dto;

import java.io.Serializable;
import javax.validation.constraints.Pattern;

import com.framework.util.lang.Regex;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

@Data
public class RoleAddDTO implements Serializable {

  private static final long serialVersionUID = 3720093122258370497L;

  /**
   * 角色名
   */
  @NotBlank
  @Pattern(regexp = Regex.CHINESE, message = "{role.name}")
  private String name;

  /**
   * 权限标识
   */
  @NotBlank
  @Pattern(regexp = Regex.IDENTIFY, message = "{role.identify}")
  private String identify;
  
  /**
   * 备注
   */
  private String remarks;

  @Override
  public String toString() {
    return "角色名称[" + name +
            "]、角色标识符[" + identify +
            "]。";
  }
}
